home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / think / AmigaGnuChess.lha / chess / src.lha / src / amiga / draw.h < prev    next >
Text File  |  1992-09-03  |  1KB  |  44 lines

  1. /*
  2. *    Pen colors for different objects.
  3. */
  4. #define BG_PEN        0
  5. #define BLACKPIECE_PEN    1
  6. #define WHITEPIECE_PEN    2
  7. #define OUTLINE_PEN    3
  8. #define BLACKSQUARE_PEN    4
  9. #define WHITESQUARE_PEN    5
  10. #define TEXT_PEN    6
  11. #define INPUT_PEN    7
  12. #define HILITE_PEN    7
  13.  
  14. #define LEFT_OFFSET    12
  15. #define TOP_OFFSET     8
  16. /* outer-dimensions */
  17. #define SQUARE_WIDTH    40
  18. #define SQUARE_HEIGHT    20
  19. /* inner-dimensions */
  20. #define SQUARE_IWIDTH    39
  21. #define SQUARE_IHEIGHT    19
  22.  
  23. /* row 0..7, col 0..7 */
  24. /* inner corners */
  25. #define SQUARE_LHS(row,col)    (LEFT_OFFSET+col*SQUARE_WIDTH+1)    
  26. #define SQUARE_TOP(row,col)    (TOP_OFFSET+row*SQUARE_HEIGHT+1)    
  27.  
  28. #define SQUARE_RHS(row,col)    (SQUARE_LHS(row,col)+SQUARE_IWIDTH-1)
  29. #define SQUARE_BOTTOM(row,col)    (SQUARE_TOP(row,col)+SQUARE_IHEIGHT-1)
  30.  
  31. /* piece colors */
  32. #define BLACK 0
  33. #define WHITE 1
  34.  
  35. /* prototypes */
  36. void AmiDrawCoords(int off, int reverse);
  37. void AmiDrawGrid(void);
  38. void AmiToggleSquare(UWORD row, UWORD col);
  39. void AmiFlashSquare(UWORD row, UWORD col);
  40. void AmiDrawSquare(UWORD row, UWORD col);
  41. void AmiDrawSquares(void);
  42. void AmiDrawPiece(UWORD piece, UWORD pccolor, UWORD row, UWORD col);
  43. void AmiDrawBoard(void);
  44.